package com.lxmes.business.controller;

import com.alibaba.fastjson.JSONObject;
import com.lxmes.business.service.ICcRukuInfoWebServiceService;
import com.lxmes.common.core.controller.BaseController;
import com.lxmes.common.core.domain.AjaxResult;
import com.lxmes.common.utils.HttpClientUnit;
import com.lxmes.common.utils.StringUtils;
import com.lxmes.common.utils.WebServiceUnit;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.bind.JAXBException;
import java.util.Map;

@Api(tags="入库单接口管理")
@RestController
@RequestMapping("/businesswb/rukuWebService")
public class ICcRukuInfoWebServiceController extends BaseController {

    @Autowired
    private ICcRukuInfoWebServiceService ccRukuInfoWebServiceService;

    /**
     * U8执行入库
     *
     * */
    @GetMapping("/zhixingURuku/{ids}")
    public AjaxResult zhixingURuku(@PathVariable Long[] ids)  {

        Map<String, String> map = ccRukuInfoWebServiceService.zhixingURuku(ids);
        if (map.get("Success") == "True"){
            return AjaxResult.success("执行成功！");
        }else{
            return AjaxResult.error(map.get("errMsg"));
        }
    }
}